import  store from '@/store'
export function isLogins(){
  if(!store.state.token || store.state.token === '' || !store.state.token.length){
    if (getCurPage().$route.fullPath) {
      uni.setStorageSync('url-path', getCurPage().$route.fullPath)
    }
    uni.navigateTo({
      url: '/pages/loginSms/loginSms',
    });
  } else {
    return true
  }
}

const getCurPage = () => {
  let path = getCurrentPages();
  let router = path[path.length-1];
  return router
}
